跳到主要内容

NOW

Returns the current date and time in the <em>MM/dd/yy hh:mm</em> format.

Syntax

expression.NOW();

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

This method doesn't have any parameters.

Returns

number

Example

const oWorksheet = Api.GetActiveSheet();

var oFunction = Api.GetWorksheetFunction();
var ans = oFunction.NOW();

oWorksheet.GetRange("C1").SetValue(ans);